package cn.tedu.spring.eg1;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestEg1 {
    public static void main(String[] args) {
        // 创建spring容器
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("cn.tedu.spring.eg1");
        // 获取bean
        Product product = context.getBean(Product.class);
        System.out.println(product);
    }
}
